import BuffUtil from '@/BuffUtil';
import UnitSpellEvent from '@/event/UnitSpellEvent';
import SelectCommon from 'code/Core/Common/SelectCommon';
export default class Item_领袖的大盾 {
    static id = 'Alx2';
    static 名称: string = '领袖的大盾';
    static 描述: string = '生命值提升，生命回复速度提升';
    static 图标: string = 'ReplaceableTextures\\CommandButtons\\BTNHumanArmorUpThree.blp';
    static buffId: string = 'buff_item_lingxiudadun';
    static buffType: AppBuffType = {
        id: 'buff_item_lingxiudadun',
        name: Item_领袖的大盾.名称,
        ubertip: Item_领袖的大盾.描述,
        art: Item_领袖的大盾.图标,
        attribute: {
            life_p: 0.15,
            生命恢复: 50,
        },
        dur: 15,
        targetAttach: 'overhead',
        targetArt: 'Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl',
    };
    static 释放(x: number, y: number, 来源?: unit, 目标?: unit, d?: any) {
        let es = SelectCommon.getAllyUnitInRange(来源, 750);
        for (let e of es) {
            BuffUtil.addBuff(e, Item_领袖的大盾.buffId, 来源);
        }
    }
    constructor() {
        BuffUtil.registerBuffType(Item_领袖的大盾.buffType);
        se.onUnitSpellEffect(Item_领袖的大盾.spellEffect, Item_领袖的大盾.id);
    }
    static spellEffect(this: void, d: UnitSpellEvent) {
        Item_领袖的大盾.释放(d.spellTargetX, d.spellTargetY, d.trigUnit, d.spellTargetUnit, d);
    }
}
